<template>
  <div class="alter-container">



  </div><!-- end container -->
</template>

<script type="text/javascript">
  export default {
    props :[],
    name: 'alter',
    data() {
      return {
   
     timerNum:60
      }
    }, // end data
    methods:{
              timelop(){
            var self = this;

            console.log('获取验证码')
            self.timer = setInterval(function(){
                    self.isGetverify =true
                if(self.timerNum >=1){
                    self.timerNum--;
                }else{
                    clearInterval(self.timer);
                    self.timerNum = 60;
                }
                  let verInfo={
                        type : 'setsign',
                        num : self.timerNum
                    }
                self.$store.commit("SETVERCODE", verInfo);                
           
                console.log(self.timerNum)
            },100)
            
        },
    




    },
    mounted(){
           if(this.$store.getters.getLoginVerifyCode < 60){
            this.timerNum = this.$store.getters.getLoginVerifyCode;
            // this.isGetverify= true;
            this.timelop();
            }
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" scoped>

</style>